import { createApp } from 'vue'
import { createStore } from 'vuex';

import storeConfig from './store';
import ElementPlus from 'element-plus'
import App from './App.vue'

// import axios from 'axios';


// xPost 
// axios.interceptors.request.use((config)=>{
//     // ...config
//     console.log('request-config', config);
//     return config
// }, error=>{
//     console.log('request-error', error)
// })

// axios.interceptors.response.use((result)=>{
//     // ...config
//     console.log('response-config', result);
//     return result
// }, error=>{
//     console.log('response-error', error)
// })

const app = createApp(App);

const store = createStore(storeConfig);

// 注册自定义指令
app.directive("focus", {
    mounted: function(el, binding){
        el.focus();
    }
})
app.use(ElementPlus);

// 注册插件
app.use(store); 

app.mount('#app');

